
package com.asp.aspchain.core.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;

/**
 * 
 *
 * @author aspire
 * @Date 2018-11-27 15:11
 */
@TableName("t_abc_transaction")
public class TransactionModel extends Model<TransactionModel> {

    private static final long serialVersionUID = 1L;

    /**
     * ZL+2018021011203345时间戳
     * 
     */
    @TableId(value = "tradeid", type = IdType.INPUT)
    private String tradeid;
    /**
     * 业务订单时间
     * 
     */
    private Date ordertime;
    /**
     * 业务订单号
     * 
     */
    private String orderid;
    /**
     * appid+’appid’或者mgt
     * 
     */
    private String appid;
    /**
     * Tradetype
     * 
     */
    private String tradetype;
    /**
     * 创建时间
     * 
     */
    private Date createtime;
    /**
     * 更新时间
     * 
     */
    private Date updatetime;
    /**
     * 区块链账户
     * 
     */
    private String fromaaccountid;
    /**
     * 00 eoa账户01 coa账户
     * 
     */
    private String fromtype;
    /**
     * 目标卓链账户
     * 
     */
    private String toaaccountid;
    /**
     * 00 eoa账户01 coa账户
     * 
     */
    private String totype;
    /**
     * token余额类型 eth (以太TOKEN） sxt（碎星TOKEN） sxt(黑转TOKEN）
     * 
     */
    private String tokentype;
    /**
     * 交易价值
     * 
     */
    private BigInteger tokenvalue;
    /**
     * 智能合约携带资产数据，取asset的前40位保存
     * 
     */
    private String asset;
    /**
     * 区块链生成的交易号
     * 
     */
    private String transactionid;
    /**
     * 默认为 00 init 10 pending 20 complte
     * 
     */
    private String status;
    /**
     * 交易时间
     * 
     */
    private Date transtime;
    /**
     * 块地址
     * 
     */
    private String blockhash;
    /**
     * 出块时间
     * 
     */
    private Date blocktime;
    /**
     * 发送通知时间
     * 
     */
    private Date notifytime;
    /**
     * NTF+时间戳
     * 
     */
    private String notifyid;
    /**
     * my 我的资产
     * my 我的资产,cp 副本资产
     */
    private String assettype;
    /**
     * gas的值
     * 
     */
    private BigInteger gas;
    /**
     * nonce值
     * 
     */
    private BigInteger nonce;
    /**
     * 如果是智能合约要调用智能合约的地址。非智能合约为空
     * 
     */
    private String contractid;
    /**
     * 交易号，当为退费的时候，记录支付的交易号。
     * 
     */
    private String xtradeid;

    public String getTradeid() {
           return tradeid;
    }

    public void setTradeid(String tradeid) {
     	this.tradeid = tradeid;
    }

    public Date getOrdertime() {
           return ordertime;
    }

    public void setOrdertime(Date ordertime) {
     	this.ordertime = ordertime;
    }

    public String getOrderid() {
           return orderid;
    }

    public void setOrderid(String orderid) {
     	this.orderid = orderid;
    }

    public String getAppid() {
           return appid;
    }

    public void setAppid(String appid) {
     	this.appid = appid;
    }

    public String getTradetype() {
           return tradetype;
    }

    public void setTradetype(String tradetype) {
     	this.tradetype = tradetype;
    }

    public Date getCreatetime() {
           return createtime;
    }

    public void setCreatetime(Date createtime) {
     	this.createtime = createtime;
    }

    public Date getUpdatetime() {
           return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
     	this.updatetime = updatetime;
    }

    public String getFromaaccountid() {
           return fromaaccountid;
    }

    public void setFromaaccountid(String fromaaccountid) {
     	this.fromaaccountid = fromaaccountid;
    }

    public String getFromtype() {
           return fromtype;
    }

    public void setFromtype(String fromtype) {
     	this.fromtype = fromtype;
    }

    public String getToaaccountid() {
           return toaaccountid;
    }

    public void setToaaccountid(String toaaccountid) {
     	this.toaaccountid = toaaccountid;
    }

    public String getTotype() {
           return totype;
    }

    public void setTotype(String totype) {
     	this.totype = totype;
    }

    public String getTokentype() {
           return tokentype;
    }

    public void setTokentype(String tokentype) {
     	this.tokentype = tokentype;
    }

    public BigInteger getTokenvalue() {
           return tokenvalue;
    }

    public void setTokenvalue(BigInteger tokenvalue) {
     	this.tokenvalue = tokenvalue;
    }

    public String getAsset() {
           return asset;
    }

    public void setAsset(String asset) {
     	this.asset = asset;
    }

    public String getTransactionid() {
           return transactionid;
    }

    public void setTransactionid(String transactionid) {
     	this.transactionid = transactionid;
    }

    public String getStatus() {
           return status;
    }

    public void setStatus(String status) {
     	this.status = status;
    }

    public Date getTranstime() {
           return transtime;
    }

    public void setTranstime(Date transtime) {
     	this.transtime = transtime;
    }

    public String getBlockhash() {
           return blockhash;
    }

    public void setBlockhash(String blockhash) {
     	this.blockhash = blockhash;
    }

    public Date getBlocktime() {
           return blocktime;
    }

    public void setBlocktime(Date blocktime) {
     	this.blocktime = blocktime;
    }

    public Date getNotifytime() {
           return notifytime;
    }

    public void setNotifytime(Date notifytime) {
     	this.notifytime = notifytime;
    }

    public String getNotifyid() {
           return notifyid;
    }

    public void setNotifyid(String notifyid) {
     	this.notifyid = notifyid;
    }

    public String getAssettype() {
           return assettype;
    }

    public void setAssettype(String assettype) {
     	this.assettype = assettype;
    }

    public BigInteger getGas() {
           return gas;
    }

    public void setGas(BigInteger gas) {
     	this.gas = gas;
    }

    public BigInteger getNonce() {
           return nonce;
    }

    public void setNonce(BigInteger nonce) {
     	this.nonce = nonce;
    }

    public String getContractid() {
           return contractid;
    }

    public void setContractid(String contractid) {
     	this.contractid = contractid;
    }

    public String getXtradeid() {
           return xtradeid;
    }

    public void setXtradeid(String xtradeid) {
     	this.xtradeid = xtradeid;
    }

    @Override
    protected Serializable pkVal() {
           return this.tradeid;
    }

    @Override
    public String toString() {
        return ReflectionToStringBuilder.toString(this);
    }
}
